package com.ibeeking.found.cop.service.common.enums;

public enum WxCpMessageSendWayEnum {
    MESSAGE_SEND_WAY_NOW(1, "立即发送"),
    MESSAGE_SEND_WAY_TASK(2, "定时发送"),
    ;
    private Integer code;
    private String desc;

    WxCpMessageSendWayEnum(Integer code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public Integer getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByCode(Integer code) {
        for (WxCpMessageSendWayEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getDesc();
            }
        }
        return null;
    }
}
